home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / COM / ISDNSerial 1.0.2.sit / ISDNSerial 1.0.2 / ISDN next >
Text File  |  1995-11-06  |  2KB  |  108 lines

  1. ! "ISDN Serial driver"
  2. @ORIGINATE
  3. @ANSWER
  4. !
  5. @LABEL 1
  6. serreset 57600, 0, 8, 1
  7. setspeed 64000
  8. hsreset 0 0 0 0 0 0
  9. !
  10. ! The ISDN driver is designed to do everything based on one command.  This is 
  11. ! necessary since commands are executed only at tasks time, and when ARA is 
  12. ! setting up to answer calls during boot, there may be a very long delay before
  13. ! there is any task time.  Hence we issue the one command and wait forever.
  14. !
  15. ifANSWER 30
  16. note "Dialing ^1" 3
  17. !
  18. write "AT*D '' '' '^1'¥13"
  19. matchstr 1 11 "CONNECT¥13¥10"
  20. matchstr 2 50 "NO CARRIER¥13¥10"
  21. matchstr 3 50 "ERROR¥13¥10"
  22. matchstr 4 52 "NO DIALTONE¥13¥10"
  23. matchstr 5 53 "BUSY¥13¥10"
  24. matchstr 6 54 "NO ANSWER¥13¥10"
  25. matchread 1200
  26. jump 59
  27. !
  28. @LABEL 11
  29. note "Communicating via ISDN." 3
  30. jump 15
  31. !
  32. @LABEL 15
  33. ifANSWER 16
  34. pause 10
  35. exit 0
  36. !
  37. @LABEL 16
  38.  
  39. @LABEL 17
  40. exit 0
  41. !
  42. ! @ANSWER
  43. ! Set up the modem to answer
  44. @LABEL 30
  45. write "AT*D '' '' ''¥13"
  46. !
  47. @LABEL 31
  48. matchstr 1  32 "RING¥13¥10"
  49. matchstr 2  11 "CONNECT¥13¥10"
  50. matchstr 3  50 "NO CARRIER¥13¥10"
  51. matchstr 4  50 "ERROR¥13¥10"
  52. matchstr 5  52 "NO DIALTONE¥13¥10"
  53. matchstr 6  53 "BUSY¥13¥10"
  54. matchstr 7  54 "NO ANSWER¥13¥10"
  55. matchread 6000
  56. jump 31
  57. !
  58. @LABEL 32
  59. userhook 1
  60. note "Answering phoneノ" 2
  61. jump 31
  62. !
  63. ! 50: error messages
  64. !
  65. @LABEL 50
  66. exit -6021 "Unable to make an ISDN connection, check configuration and try again."
  67. !
  68. @LABEL 52
  69. exit -6020
  70. !
  71. @LABEL 53
  72. exit -6022
  73. !
  74. @LABEL 54
  75. exit -6023
  76. !
  77. @LABEL 59
  78. exit -6019 "The ISDN software is not responding, it may not be configured correctly."
  79. !
  80. ! Hang up the modem
  81. !
  82. @HANGUP
  83. @LABEL 60
  84. settries 0
  85. write "+++"
  86. pause 5
  87. !
  88. ! Try to reset the modem.  If ARA is not making idle time calls, this may fail with a
  89. ! PENDING message the second time we do it.  In this case we assume it will get done
  90. ! eventually and quit.
  91. !
  92. @LABEL 62
  93. write "ATZ¥13"
  94. matchclr
  95. matchstr 1 63 "OK¥13¥10"
  96. matchstr 2 59 "ERROR¥13¥10"
  97. matchstr 3 63 "PENDING¥13¥10"
  98. matchread 30
  99. inctries
  100. iftries 3 64
  101. Jump 62
  102. !
  103. @LABEL 63
  104. !
  105. @LABEL 64
  106. exit 0
  107.  
  108.